
import java.util.Scanner;
    }
    @Override
    public String toString() {
        return num +"invalid!";



    }

}
public class Main {
public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
 int jige=0;
 int no=0;
 for (int i = 0; i <n; i++) {
int s=-1;
while (s<0||s>100) {
    s = sc.nextInt();
    
    
    
    try{if(s<0||s>100){
        throw new   Illegal(s) ;



    }

        if(s<60){
            no++;


        }
        else {
            jige++;


        }

    }
catch (Illegal e){
        System.out.println(e);


}


}



 }


    System.out.println(jige);
    System.out.println(no);



}



}
